#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
m4_define(comono_version_major, 0)
m4_define(comono_version_minor, 0)
m4_define(comono_version_micro, 2)
AC_INIT([comono],
	[comono_version_major().comono_version_minor().comono_version_micro()],
	 norihiro.umeda@gmail.com)
AM_INIT_AUTOMAKE

AC_CONFIG_SRCDIR([src/XMLHttpRequestClass.h])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_CC

# Checks for libraries.

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([netdb.h stdlib.h string.h sys/socket.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SSIZE_T
AC_PROG_INTLTOOL

# Checks for library functions.
AC_CHECK_FUNCS([memset socket])

dnl pkg-config
PKG_PROG_PKG_CONFIG

dnl GLIB
PKG_CHECK_MODULES([GLIB], [glib-2.0 gobject-2.0 gthread-2.0 gmodule-2.0])

dnl GTK
PKG_CHECK_MODULES([GTK], [gtk+-2.0 >= 2.12.0 gdk-2.0 >= 2.12.0])

dnl LIBXML2
PKG_CHECK_MODULES([LIBXML2], [libxml-2.0])

dnl DBUS
PKG_CHECK_MODULES([DBUS], [dbus-1])

dnl HAL
PKG_CHECK_MODULES([HAL], [hal])

dnl NSPR
PKG_CHECK_MODULES([NSPR], [nspr])

dnl CFLAGS
CFLAGS="$CFLAGS -Wall -pedantic"

dnl intltool
ALL_LINGUAS="ja"
AM_GLIB_GNU_GETTEXT

AC_SUBST(ALL_LINGUAS)
GETTEXT_PACKAGE=comono
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
AC_SUBST(GETTEXT_PACKAGE)

comonolocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(comonolocaledir)

AC_CONFIG_FILES([
	Makefile
	src/Makefile
	po/Makefile.in
])
AC_OUTPUT
